Ti.UI.setBackgroundColor('#000');

//Include app header
Ti.include('background.js');
Ti.include('background_table.js');


// create base UI tab and root window
var app = Ti.UI.createWindow({  
    backgroundImage:DotNetNuke.getBackgroundImage(),
    navBarHidden: true,
    orientationModes: Ti.UI.PORTRAIT,
    exitOnClose: true
});
app.add(headerView);
app.add(viewContainer);

viewContainer.add(viewTable);

// Create the Main App Window
app.open();


//
//Add global event handlers to hide/show custom indicator
//
Ti.App.addEventListener('show_indicator', function(e)
{
	showIndicator();
});
Ti.App.addEventListener('hide_indicator', function(e)
{
	hideIndicator();
});

//Validate network service
if (!Ti.Network.online) {
  var a = Ti.UI.createAlertDialog({ 
    title:'Network Connection Required',
    message: 'DotNetNuke Pulse requires an internet connection to, you know, upload stuff to the internet.  Check your network connection and try again.'
  });
	a.show();
}

